package edu.zut.hb.software.train.SiteManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Site.dao.SiteDao;
import edu.zut.hb.software.train.Site.domin.Site;
import edu.zut.hb.software.train.SiteManager.service.SiteManager;


@Service("siteManager")
public class SiteManagerImpl extends GenericManagerImpl<Site, Long> implements SiteManager {

	
	SiteDao siteDao;
	
	@Autowired
	public void setSitenDao(SiteDao siteDao) {
		this.siteDao = siteDao;
		this.dao = this.siteDao;
	}

	@Override
	public List<Site> getAll() {
		List<Site> all = this.siteDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Site> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}